3.9.17 \(\int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx\) [817]

3.9.17.1 Optimal result
3.9.17.2 Mathematica [A] (verified)
3.9.17.3 Rubi [A] (verified)
3.9.17.4 Maple [A] (verified)
3.9.17.5 Fricas [B] (verification not implemented)
3.9.17.6 Sympy [F(-1)]
3.9.17.7 Maxima [B] (verification not implemented)
3.9.17.8 Giac [F]
3.9.17.9 Mupad [F(-1)]

3.9.17.1 Optimal result

Integrand size = 45, antiderivative size = 267 \[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx=-\frac {5 i a^{7/2} A c^{7/2} \arctan \left (\frac {\sqrt {c} \sqrt {a+i a \tan (e+f x)}}{\sqrt {a} \sqrt {c-i c \tan (e+f x)}}\right )}{8 f}+\frac {5 a^3 A c^3 \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}}{16 f}+\frac {5 a^2 A c^2 \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}}{24 f}+\frac {a A c \tan (e+f x) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}}{6 f}+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{7 f} \]

output
-5/8*I*a^(7/2)*A*c^(7/2)*arctan(c^(1/2)*(a+I*a*tan(f*x+e))^(1/2)/a^(1/2)/( 
c-I*c*tan(f*x+e))^(1/2))/f+5/16*a^3*A*c^3*(a+I*a*tan(f*x+e))^(1/2)*(c-I*c* 
tan(f*x+e))^(1/2)*tan(f*x+e)/f+5/24*a^2*A*c^2*tan(f*x+e)*(a+I*a*tan(f*x+e) 
)^(3/2)*(c-I*c*tan(f*x+e))^(3/2)/f+1/6*a*A*c*tan(f*x+e)*(a+I*a*tan(f*x+e)) 
^(5/2)*(c-I*c*tan(f*x+e))^(5/2)/f+1/7*B*(a+I*a*tan(f*x+e))^(7/2)*(c-I*c*ta 
n(f*x+e))^(7/2)/f
 
3.9.17.2 Mathematica [A] (verified)

Time = 8.56 (sec) , antiderivative size = 159, normalized size of antiderivative = 0.60 \[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx=\frac {a^{7/2} c^4 \left (-\frac {6720 A \arcsin \left (\frac {\sqrt {a+i a \tan (e+f x)}}{\sqrt {2} \sqrt {a}}\right ) (i+\tan (e+f x))}{\sqrt {1-i \tan (e+f x)}}+\frac {\sqrt {a} \sec ^8(e+f x) (1536 B+1981 A \sin (2 (e+f x))+700 A \sin (4 (e+f x))+105 A \sin (6 (e+f x)))}{\sqrt {a+i a \tan (e+f x)}}\right )}{10752 f \sqrt {c-i c \tan (e+f x)}} \]

input
Integrate[(a + I*a*Tan[e + f*x])^(7/2)*(A + B*Tan[e + f*x])*(c - I*c*Tan[e 
 + f*x])^(7/2),x]
 
output
(a^(7/2)*c^4*((-6720*A*ArcSin[Sqrt[a + I*a*Tan[e + f*x]]/(Sqrt[2]*Sqrt[a]) 
]*(I + Tan[e + f*x]))/Sqrt[1 - I*Tan[e + f*x]] + (Sqrt[a]*Sec[e + f*x]^8*( 
1536*B + 1981*A*Sin[2*(e + f*x)] + 700*A*Sin[4*(e + f*x)] + 105*A*Sin[6*(e 
 + f*x)]))/Sqrt[a + I*a*Tan[e + f*x]]))/(10752*f*Sqrt[c - I*c*Tan[e + f*x] 
])
 
3.9.17.3 Rubi [A] (verified)

Time = 0.42 (sec) , antiderivative size = 261, normalized size of antiderivative = 0.98, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.178, Rules used = {3042, 4071, 90, 40, 40, 40, 45, 218}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2} (A+B \tan (e+f x)) \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2} (A+B \tan (e+f x))dx\)

\(\Big \downarrow \) 4071

\(\displaystyle \frac {a c \int (i \tan (e+f x) a+a)^{5/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{5/2}d\tan (e+f x)}{f}\)

\(\Big \downarrow \) 90

\(\displaystyle \frac {a c \left (A \int (i \tan (e+f x) a+a)^{5/2} (c-i c \tan (e+f x))^{5/2}d\tan (e+f x)+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{7 a c}\right )}{f}\)

\(\Big \downarrow \) 40

\(\displaystyle \frac {a c \left (A \left (\frac {5}{6} a c \int (i \tan (e+f x) a+a)^{3/2} (c-i c \tan (e+f x))^{3/2}d\tan (e+f x)+\frac {1}{6} \tan (e+f x) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}\right )+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{7 a c}\right )}{f}\)

\(\Big \downarrow \) 40

\(\displaystyle \frac {a c \left (A \left (\frac {5}{6} a c \left (\frac {3}{4} a c \int \sqrt {i \tan (e+f x) a+a} \sqrt {c-i c \tan (e+f x)}d\tan (e+f x)+\frac {1}{4} \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}\right )+\frac {1}{6} \tan (e+f x) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}\right )+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{7 a c}\right )}{f}\)

\(\Big \downarrow \) 40

\(\displaystyle \frac {a c \left (A \left (\frac {5}{6} a c \left (\frac {3}{4} a c \left (\frac {1}{2} a c \int \frac {1}{\sqrt {i \tan (e+f x) a+a} \sqrt {c-i c \tan (e+f x)}}d\tan (e+f x)+\frac {1}{2} \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}\right )+\frac {1}{4} \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}\right )+\frac {1}{6} \tan (e+f x) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}\right )+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{7 a c}\right )}{f}\)

\(\Big \downarrow \) 45

\(\displaystyle \frac {a c \left (A \left (\frac {5}{6} a c \left (\frac {3}{4} a c \left (a c \int \frac {1}{i a+\frac {i c (i \tan (e+f x) a+a)}{c-i c \tan (e+f x)}}d\frac {\sqrt {i \tan (e+f x) a+a}}{\sqrt {c-i c \tan (e+f x)}}+\frac {1}{2} \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}\right )+\frac {1}{4} \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}\right )+\frac {1}{6} \tan (e+f x) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}\right )+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{7 a c}\right )}{f}\)

\(\Big \downarrow \) 218

\(\displaystyle \frac {a c \left (A \left (\frac {5}{6} a c \left (\frac {3}{4} a c \left (\frac {1}{2} \tan (e+f x) \sqrt {a+i a \tan (e+f x)} \sqrt {c-i c \tan (e+f x)}-i \sqrt {a} \sqrt {c} \arctan \left (\frac {\sqrt {c} \sqrt {a+i a \tan (e+f x)}}{\sqrt {a} \sqrt {c-i c \tan (e+f x)}}\right )\right )+\frac {1}{4} \tan (e+f x) (a+i a \tan (e+f x))^{3/2} (c-i c \tan (e+f x))^{3/2}\right )+\frac {1}{6} \tan (e+f x) (a+i a \tan (e+f x))^{5/2} (c-i c \tan (e+f x))^{5/2}\right )+\frac {B (a+i a \tan (e+f x))^{7/2} (c-i c \tan (e+f x))^{7/2}}{7 a c}\right )}{f}\)

input
Int[(a + I*a*Tan[e + f*x])^(7/2)*(A + B*Tan[e + f*x])*(c - I*c*Tan[e + f*x 
])^(7/2),x]
 
output
(a*c*((B*(a + I*a*Tan[e + f*x])^(7/2)*(c - I*c*Tan[e + f*x])^(7/2))/(7*a*c 
) + A*((Tan[e + f*x]*(a + I*a*Tan[e + f*x])^(5/2)*(c - I*c*Tan[e + f*x])^( 
5/2))/6 + (5*a*c*((Tan[e + f*x]*(a + I*a*Tan[e + f*x])^(3/2)*(c - I*c*Tan[ 
e + f*x])^(3/2))/4 + (3*a*c*((-I)*Sqrt[a]*Sqrt[c]*ArcTan[(Sqrt[c]*Sqrt[a + 
 I*a*Tan[e + f*x]])/(Sqrt[a]*Sqrt[c - I*c*Tan[e + f*x]])] + (Tan[e + f*x]* 
Sqrt[a + I*a*Tan[e + f*x]]*Sqrt[c - I*c*Tan[e + f*x]])/2))/4))/6)))/f
 

3.9.17.3.1 Defintions of rubi rules used

rule 40
Int[((a_) + (b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[x* 
(a + b*x)^m*((c + d*x)^m/(2*m + 1)), x] + Simp[2*a*c*(m/(2*m + 1))   Int[(a 
 + b*x)^(m - 1)*(c + d*x)^(m - 1), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[ 
b*c + a*d, 0] && IGtQ[m + 1/2, 0]
 

rule 45
Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_) + (d_.)*(x_)]), x_Symbol] :> Simp[ 
2   Subst[Int[1/(b - d*x^2), x], x, Sqrt[a + b*x]/Sqrt[c + d*x]], x] /; Fre 
eQ[{a, b, c, d}, x] && EqQ[b*c + a*d, 0] &&  !GtQ[c, 0]
 

rule 90
Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p 
_.), x_] :> Simp[b*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + p + 2))), 
 x] + Simp[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(d*f*(n + p 
+ 2))   Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, 
p}, x] && NeQ[n + p + 2, 0]
 

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 4071
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + 
 (f_.)*(x_)])*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Si 
mp[a*(c/f)   Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^(n - 1)*(A + B*x), x], x 
, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && EqQ[b*c 
+ a*d, 0] && EqQ[a^2 + b^2, 0]
 
3.9.17.4 Maple [A] (verified)

Time = 0.40 (sec) , antiderivative size = 269, normalized size of antiderivative = 1.01

method result size
parts \(\frac {A \sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, a^{3} c^{3} \left (8 \tan \left (f x +e \right )^{5} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+26 \tan \left (f x +e \right )^{3} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+15 a c \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}{\sqrt {a c}}\right )+33 \tan \left (f x +e \right ) \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}\right )}{48 f \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}}+\frac {B \sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, a^{3} c^{3} \left (1+\tan \left (f x +e \right )^{2}\right ) \left (\tan \left (f x +e \right )^{4}+2 \tan \left (f x +e \right )^{2}+1\right )}{7 f}\) \(269\)
derivativedivides \(\frac {\sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, a^{3} c^{3} \left (48 B \tan \left (f x +e \right )^{6} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+56 A \tan \left (f x +e \right )^{5} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+144 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{4}+182 A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{3}+144 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{2}+105 A \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}{\sqrt {a c}}\right ) a c +231 A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )+48 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\right )}{336 f \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}\) \(314\)
default \(\frac {\sqrt {a \left (1+i \tan \left (f x +e \right )\right )}\, \sqrt {-c \left (i \tan \left (f x +e \right )-1\right )}\, a^{3} c^{3} \left (48 B \tan \left (f x +e \right )^{6} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+56 A \tan \left (f x +e \right )^{5} \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \sqrt {a c}+144 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{4}+182 A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{3}+144 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )^{2}+105 A \ln \left (\frac {a c \tan \left (f x +e \right )+\sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}{\sqrt {a c}}\right ) a c +231 A \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\, \tan \left (f x +e \right )+48 B \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}\right )}{336 f \sqrt {a c}\, \sqrt {a c \left (1+\tan \left (f x +e \right )^{2}\right )}}\) \(314\)

input
int((a+I*a*tan(f*x+e))^(7/2)*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^(7/2),x,m 
ethod=_RETURNVERBOSE)
 
output
1/48*A/f*(a*(1+I*tan(f*x+e)))^(1/2)*(-c*(I*tan(f*x+e)-1))^(1/2)*a^3*c^3*(8 
*tan(f*x+e)^5*(a*c*(1+tan(f*x+e)^2))^(1/2)*(a*c)^(1/2)+26*tan(f*x+e)^3*(a* 
c*(1+tan(f*x+e)^2))^(1/2)*(a*c)^(1/2)+15*a*c*ln((a*c*tan(f*x+e)+(a*c)^(1/2 
)*(a*c*(1+tan(f*x+e)^2))^(1/2))/(a*c)^(1/2))+33*tan(f*x+e)*(a*c*(1+tan(f*x 
+e)^2))^(1/2)*(a*c)^(1/2))/(a*c*(1+tan(f*x+e)^2))^(1/2)/(a*c)^(1/2)+1/7*B/ 
f*(a*(1+I*tan(f*x+e)))^(1/2)*(-c*(I*tan(f*x+e)-1))^(1/2)*a^3*c^3*(1+tan(f* 
x+e)^2)*(tan(f*x+e)^4+2*tan(f*x+e)^2+1)
 
3.9.17.5 Fricas [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 693 vs. \(2 (207) = 414\).

Time = 0.27 (sec) , antiderivative size = 693, normalized size of antiderivative = 2.60 \[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx=\frac {105 \, \sqrt {\frac {A^{2} a^{7} c^{7}}{f^{2}}} {\left (f e^{\left (12 i \, f x + 12 i \, e\right )} + 6 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 15 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 20 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 15 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 6 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )} \log \left (\frac {4 \, {\left (2 \, {\left (A a^{3} c^{3} e^{\left (3 i \, f x + 3 i \, e\right )} + A a^{3} c^{3} e^{\left (i \, f x + i \, e\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} - \sqrt {\frac {A^{2} a^{7} c^{7}}{f^{2}}} {\left (i \, f e^{\left (2 i \, f x + 2 i \, e\right )} - i \, f\right )}\right )}}{A a^{3} c^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + A a^{3} c^{3}}\right ) - 105 \, \sqrt {\frac {A^{2} a^{7} c^{7}}{f^{2}}} {\left (f e^{\left (12 i \, f x + 12 i \, e\right )} + 6 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 15 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 20 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 15 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 6 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )} \log \left (\frac {4 \, {\left (2 \, {\left (A a^{3} c^{3} e^{\left (3 i \, f x + 3 i \, e\right )} + A a^{3} c^{3} e^{\left (i \, f x + i \, e\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} - \sqrt {\frac {A^{2} a^{7} c^{7}}{f^{2}}} {\left (-i \, f e^{\left (2 i \, f x + 2 i \, e\right )} + i \, f\right )}\right )}}{A a^{3} c^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + A a^{3} c^{3}}\right ) + 4 \, {\left (-105 i \, A a^{3} c^{3} e^{\left (13 i \, f x + 13 i \, e\right )} - 700 i \, A a^{3} c^{3} e^{\left (11 i \, f x + 11 i \, e\right )} - 1981 i \, A a^{3} c^{3} e^{\left (9 i \, f x + 9 i \, e\right )} + 3072 \, B a^{3} c^{3} e^{\left (7 i \, f x + 7 i \, e\right )} + 1981 i \, A a^{3} c^{3} e^{\left (5 i \, f x + 5 i \, e\right )} + 700 i \, A a^{3} c^{3} e^{\left (3 i \, f x + 3 i \, e\right )} + 105 i \, A a^{3} c^{3} e^{\left (i \, f x + i \, e\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{672 \, {\left (f e^{\left (12 i \, f x + 12 i \, e\right )} + 6 \, f e^{\left (10 i \, f x + 10 i \, e\right )} + 15 \, f e^{\left (8 i \, f x + 8 i \, e\right )} + 20 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 15 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 6 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \]

input
integrate((a+I*a*tan(f*x+e))^(7/2)*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^(7/ 
2),x, algorithm="fricas")
 
output
1/672*(105*sqrt(A^2*a^7*c^7/f^2)*(f*e^(12*I*f*x + 12*I*e) + 6*f*e^(10*I*f* 
x + 10*I*e) + 15*f*e^(8*I*f*x + 8*I*e) + 20*f*e^(6*I*f*x + 6*I*e) + 15*f*e 
^(4*I*f*x + 4*I*e) + 6*f*e^(2*I*f*x + 2*I*e) + f)*log(4*(2*(A*a^3*c^3*e^(3 
*I*f*x + 3*I*e) + A*a^3*c^3*e^(I*f*x + I*e))*sqrt(a/(e^(2*I*f*x + 2*I*e) + 
 1))*sqrt(c/(e^(2*I*f*x + 2*I*e) + 1)) - sqrt(A^2*a^7*c^7/f^2)*(I*f*e^(2*I 
*f*x + 2*I*e) - I*f))/(A*a^3*c^3*e^(2*I*f*x + 2*I*e) + A*a^3*c^3)) - 105*s 
qrt(A^2*a^7*c^7/f^2)*(f*e^(12*I*f*x + 12*I*e) + 6*f*e^(10*I*f*x + 10*I*e) 
+ 15*f*e^(8*I*f*x + 8*I*e) + 20*f*e^(6*I*f*x + 6*I*e) + 15*f*e^(4*I*f*x + 
4*I*e) + 6*f*e^(2*I*f*x + 2*I*e) + f)*log(4*(2*(A*a^3*c^3*e^(3*I*f*x + 3*I 
*e) + A*a^3*c^3*e^(I*f*x + I*e))*sqrt(a/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(c/ 
(e^(2*I*f*x + 2*I*e) + 1)) - sqrt(A^2*a^7*c^7/f^2)*(-I*f*e^(2*I*f*x + 2*I* 
e) + I*f))/(A*a^3*c^3*e^(2*I*f*x + 2*I*e) + A*a^3*c^3)) + 4*(-105*I*A*a^3* 
c^3*e^(13*I*f*x + 13*I*e) - 700*I*A*a^3*c^3*e^(11*I*f*x + 11*I*e) - 1981*I 
*A*a^3*c^3*e^(9*I*f*x + 9*I*e) + 3072*B*a^3*c^3*e^(7*I*f*x + 7*I*e) + 1981 
*I*A*a^3*c^3*e^(5*I*f*x + 5*I*e) + 700*I*A*a^3*c^3*e^(3*I*f*x + 3*I*e) + 1 
05*I*A*a^3*c^3*e^(I*f*x + I*e))*sqrt(a/(e^(2*I*f*x + 2*I*e) + 1))*sqrt(c/( 
e^(2*I*f*x + 2*I*e) + 1)))/(f*e^(12*I*f*x + 12*I*e) + 6*f*e^(10*I*f*x + 10 
*I*e) + 15*f*e^(8*I*f*x + 8*I*e) + 20*f*e^(6*I*f*x + 6*I*e) + 15*f*e^(4*I* 
f*x + 4*I*e) + 6*f*e^(2*I*f*x + 2*I*e) + f)
 
3.9.17.6 Sympy [F(-1)]

Timed out. \[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx=\text {Timed out} \]

input
integrate((a+I*a*tan(f*x+e))**(7/2)*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))**( 
7/2),x)
 
output
Timed out
 
3.9.17.7 Maxima [B] (verification not implemented)

Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1901 vs. \(2 (207) = 414\).

Time = 2.74 (sec) , antiderivative size = 1901, normalized size of antiderivative = 7.12 \[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx=\text {Too large to display} \]

input
integrate((a+I*a*tan(f*x+e))^(7/2)*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^(7/ 
2),x, algorithm="maxima")
 
output
-(420*A*a^3*c^3*cos(13/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 28 
00*A*a^3*c^3*cos(11/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 7924* 
A*a^3*c^3*cos(9/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 12288*I*B 
*a^3*c^3*cos(7/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) - 7924*A*a^3 
*c^3*cos(5/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) - 2800*A*a^3*c^3 
*cos(3/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) - 420*A*a^3*c^3*cos( 
1/2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 420*I*A*a^3*c^3*sin(13/ 
2*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 2800*I*A*a^3*c^3*sin(11/2 
*arctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) + 7924*I*A*a^3*c^3*sin(9/2*a 
rctan2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) - 12288*B*a^3*c^3*sin(7/2*arct 
an2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) - 7924*I*A*a^3*c^3*sin(5/2*arctan 
2(sin(2*f*x + 2*e), cos(2*f*x + 2*e))) - 2800*I*A*a^3*c^3*sin(3/2*arctan2( 
sin(2*f*x + 2*e), cos(2*f*x + 2*e))) - 420*I*A*a^3*c^3*sin(1/2*arctan2(sin 
(2*f*x + 2*e), cos(2*f*x + 2*e))) + 210*(A*a^3*c^3*cos(14*f*x + 14*e) + 7* 
A*a^3*c^3*cos(12*f*x + 12*e) + 21*A*a^3*c^3*cos(10*f*x + 10*e) + 35*A*a^3* 
c^3*cos(8*f*x + 8*e) + 35*A*a^3*c^3*cos(6*f*x + 6*e) + 21*A*a^3*c^3*cos(4* 
f*x + 4*e) + 7*A*a^3*c^3*cos(2*f*x + 2*e) + I*A*a^3*c^3*sin(14*f*x + 14*e) 
 + 7*I*A*a^3*c^3*sin(12*f*x + 12*e) + 21*I*A*a^3*c^3*sin(10*f*x + 10*e) + 
35*I*A*a^3*c^3*sin(8*f*x + 8*e) + 35*I*A*a^3*c^3*sin(6*f*x + 6*e) + 21*I*A 
*a^3*c^3*sin(4*f*x + 4*e) + 7*I*A*a^3*c^3*sin(2*f*x + 2*e) + A*a^3*c^3)...
 
3.9.17.8 Giac [F]

\[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx=\int { {\left (B \tan \left (f x + e\right ) + A\right )} {\left (i \, a \tan \left (f x + e\right ) + a\right )}^{\frac {7}{2}} {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{\frac {7}{2}} \,d x } \]

input
integrate((a+I*a*tan(f*x+e))^(7/2)*(A+B*tan(f*x+e))*(c-I*c*tan(f*x+e))^(7/ 
2),x, algorithm="giac")
 
output
sage0*x
 
3.9.17.9 Mupad [F(-1)]

Timed out. \[ \int (a+i a \tan (e+f x))^{7/2} (A+B \tan (e+f x)) (c-i c \tan (e+f x))^{7/2} \, dx=\int \left (A+B\,\mathrm {tan}\left (e+f\,x\right )\right )\,{\left (a+a\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{7/2}\,{\left (c-c\,\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^{7/2} \,d x \]

input
int((A + B*tan(e + f*x))*(a + a*tan(e + f*x)*1i)^(7/2)*(c - c*tan(e + f*x) 
*1i)^(7/2),x)
 
output
int((A + B*tan(e + f*x))*(a + a*tan(e + f*x)*1i)^(7/2)*(c - c*tan(e + f*x) 
*1i)^(7/2), x)